package com.bnyy.medicalHousekeeper.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;

import com.bnyy.medicalHousekeeper.R;
import com.bnyy.medicalHousekeeper.base.BaseActivityImpl;
import com.bnyy.medicalHousekeeper.bean.IndexData;
import com.bnyy.medicalHousekeeper.fragment.IndexDatasFragment;

import butterknife.BindView;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2023/2/3
 **/
public class IndexDatasViewAllActivity extends BaseActivityImpl {

    @BindView(R.id.fl_container)
    FrameLayout flContainer;

    public static void show(Context context, IndexData.Data.Type type) {
        Intent intent = new Intent(context, IndexDatasViewAllActivity.class);
        intent.putExtra("type", type);
        context.startActivity(intent);
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_index_datas_view_all;
    }

    @Override
    public String getTitleStr() {
        return null;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        IndexData.Data.Type type = (IndexData.Data.Type) getIntent().getSerializableExtra("type");

        getSupportFragmentManager()
                .beginTransaction()
                .add(flContainer.getId(), IndexDatasFragment.getInstance(type, true))
                .commitNowAllowingStateLoss();
    }
}





































